<template>
	<view class="body">
		<view class="bg-white">
			<u-cell title="修改支付密码" size="large" isLink url="/pages/my/pass"></u-cell>
			<u-cell title="电子卡余额支付开启免密" label='您可在消费时， 自动扣除电子卡余额完成支付' size="large">
				<template #value>
					<u-switch v-model="switchs" @change="setSwitch"></u-switch>
				</template>
			</u-cell>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				switchs: false
			}
		},
		methods: {
			setSwitch() {
				if (!this.switchs) {
					uni.showModal({
						title: "确认开启免密支付?",
						success: (res) => {
							if (res.confirm) {
								this.switchs = true
							}
						}
					})
				} else {
					this.switchs = false
				}

			}
		}
	}
</script>

<style>

</style>